<template>
  <div>
    <p id="counter">ref---{{ count }}</p>
    <p>reactive---{{ obj.a }}---{{ obj.b }}</p>
    <button @click="btn">按钮</button>
    <Child :count="{ count }"></Child>
  </div>
</template>

<script setup>
import Child from "@/views/Child";
import { version, onMounted, ref, reactive, nextTick } from "vue";
const count = ref(0);
const obj = reactive({
  a: 1,
  b: 2,
});
const btn = () => {
  count.value++;
};
onMounted(() => {
  console.log(version); //vue的版本
});
</script>

<style></style>
